using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Configurations;
namespace Pixysoft.Framework.Reports.Core
{
    class ReportTable : IReportTable
    {
        private String reportName;
        private List<IReportColumn> columns = new List<IReportColumn>();
        private List<IReportRow> rows = new List<IReportRow>();

        public String ReportName
        {
            get
            {
                return reportName;
            }
            set
            {
                reportName = value;
            }
        }

        public IReportColumnCollection Columns
        {
            get
            {
                return new ReportTableColumnCollection(columns);
            }
        }

        public IReportRowCollection Rows
        {
            get
            {
                return new ReportTableRowCollection(columns, rows);
            }

        }

        public void Caculate()
        {
            foreach (IReportRow row in rows)
            {
                foreach (IReportCell cell in row.Cells)
                    cell.Caculate();
            }
        }

    }
}
